﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace SARD.Classes
{
    public class selectionarea
    {
        Rectangle[] selected;
        int xsize, ysize, xnumber, ynumber;
        operation atualoperation;
        mode atualmode;


        /// <summary>
        /// 
        /// </summary>
        public enum operation
        {
            normal, freesize, fixedsize, multiplefixedsize, line,
        }

        /// <summary>
        /// 
        /// </summary>
        public enum mode
        {
            statical, mtf, lsf, nps, linearity, homogeneidade,
        }

        /// <summary>
        /// 
        /// </summary>
        public operation setoperation
        {
            get { return this.atualoperation; }
            set { this.atualoperation = value; }
        }

        /// <summary>
        /// 
        /// </summary>
        public mode setmode
        {
            get { return this.atualmode; }
            set { this.atualmode = value; }
        }


        /// <summary>
        /// Set basic parameters for the base constructor.
        /// </summary>
        public selectionarea()
        {
            this.xsize = 64;
            this.ysize = 64;
            this.xnumber = 1;
            this.ynumber = 1;
            this.setoperation = operation.normal;
            this.atualmode = mode.statical;
            selected = new Rectangle[this.ynumber * this.xnumber];

        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="fsize">
        /// 
        /// </param>
        /// <param name="number">
        /// 
        /// </param>
        public selectionarea(int fsize, int number)
        {
            this.xsize = fsize;
            this.ysize = fsize;
            this.xnumber = number;
            this.ynumber = number;
            this.setoperation = operation.normal;
            this.atualmode = mode.statical;
            selected = new Rectangle[number *number];
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="size">
        /// 
        /// </param>
        /// <param name="xnumber">
        /// 
        /// </param>
        /// <param name="ynumber">
        /// 
        /// </param>
        public selectionarea(int size, int xnumber, int ynumber)
        {
            this.xsize = size;
            this.ysize = 64;
            this.xnumber = xnumber;
            this.ynumber = ynumber;
            this.setoperation = operation.normal;
            this.atualmode = mode.statical;
            selected = new Rectangle[xnumber * ynumber];
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>
        /// 
        /// </returns>
        public int Sizex()
        {
            return this.xsize;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>
        /// 
        /// </returns>
        public int Sizey()
        {
            return this.ysize;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>
        /// 
        /// </returns>
        public int numberx()
        {
            return this.xnumber;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>
        /// 
        /// </returns>
        public int numbery()
        {
            return this.ynumber;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <returns>
        /// 
        /// </returns>
        public Rectangle[] rectanglep() 
        {
            return this.selected;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="x">
        /// 
        /// </param>
        /// <param name="y">
        /// 
        /// </param>
        public void setsize(int x, int y)
        {
            this.xsize = x;
            this.xnumber = 1;
            this.ynumber = 1;
            this.ysize = y;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="x">
        /// 
        /// </param>
        /// <param name="y">
        /// 
        /// </param>
        /// <param name="xn">
        /// 
        /// </param>
        /// <param name="yn">
        /// 
        /// </param>
        public void setsize(int x, int y, int xn, int yn)
        {
            this.xsize = x;
            this.xnumber = xn;
            this.ysize = y;
            this.ynumber = yn;

        }


    }
}
